package com.study.system.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.study.common.result.Result;
import com.study.model.system.SysOperLog;
import com.study.model.vo.SysOperLogQueryVo;
import com.study.system.service.OperLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "操作日志")
@RestController
@RequestMapping("/sys/admin/operlog")
public class SysOperLogController {

    @Autowired
    private OperLogService operLogService;

    @ApiOperation(value = "分页查询")
    @GetMapping("{page}/{limit}")
    public Result getPage(@PathVariable Long page,
                          @PathVariable Long limit,
                          SysOperLogQueryVo operLogQueryVo){
        IPage<SysOperLog> page1 = operLogService.getPage(page, limit, operLogQueryVo);
        return Result.ok(page1);
    }
}
